package com.mutual.assistance.task.model.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;


@Data
@ApiModel(value="新建任务", description="新建任务")
public class CreateTaskParamsVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "任务标题")
    @NotBlank(message = "任务标题不能为空")
    private String title;

    @ApiModelProperty(value = "任务描述图片url地址")
    private String pic;

    @ApiModelProperty(value = "任务内容")
    @NotBlank(message = "任务内容不能为空")
    private String content;

    @ApiModelProperty(value = "任务类型{1: 二手交易、2: 生活互助、3: 学习辅导、4：问答互助}")
    @Range(max = 4, min = 1)
    private Integer type;

    @ApiModelProperty(value = "任务标签{日用品、二手书、商品代取、学科辅助等}")
    private String tags;

    @ApiModelProperty(value = "备注，用户可以填写一些注意事项")
    private String remark;

    @ApiModelProperty(value = "填写邮箱、qq、电话等")
    @NotBlank(message = "请至少填写一份联系方式")
    private String contactInformation;

    @ApiModelProperty(value = "联系地址")
    @NotBlank(message = "联系地址不能为空")
    private String address;

    @ApiModelProperty(value = "任务积分")
    @NotNull(message = "任务积分不能为空")
    @Min(value = 0, message = "用户积分不能小于0")
    private Integer credit;

    @ApiModelProperty(value = "任务开始时间")
    @NotNull(message = "任务开始时间不能为空")
    private LocalDateTime taskStartTime;

    @ApiModelProperty(value = "任务结束时间")
    @NotNull(message = "任务结束时间不能为空")
    private LocalDateTime taskEndTime;

}
